{include file="public/_head"}
    <!-- /Navbar -->
    <!-- Main Container -->
    <div class="main-container container-fluid">
        <!-- Page Container -->
        <div class="page-container">
{include file="public/_left"}
            <!-- Page Sidebar -->
            
            <!-- /Page Sidebar -->
            <!-- Page Content -->
            <div class="page-content">
                <!-- Page Breadcrumb -->
                <div class="page-breadcrumbs">
                    <ul class="breadcrumb">
                        <li>
                            <i class="fa fa-home"></i>&nbsp;评论管理
                        </li>
                        <li>评论列表</li>
                    </ul>
                </div>
                <!-- /Page Breadcrumb -->
                <!-- Page Body -->
                <div class="page-body">
					
					<div class="row">
						<div class="col-xs-12">
							<div class="widget">
								<div class="widget-header">
									
									<div class="widget-buttons">
										{$content->render()|raw|replace}
									</div>
								</div>
								<div class="widget-body">
									<table class="table table-hover table-bordered">
										<thead>
											<tr>
                        <th>ID</th>										
												<th>评论内容</th>									
												<th>评论人</th>									
												<th>评论文章</th>
												
												<th>创建时间</th>
												<th>操作</th>
											</tr>
										</thead>
										{volist name="content" id="vo"}
										<tr>
                      <td>{$vo.id}</td>
											<td>{$vo.content}</td>
											<td>{$vo.member.nickname}</td>
											<td>{$vo.article.title}</td>											
											<td>{$vo.create_time}</td>
											<td>									
												<a href="#" dataid="{$vo.id}" class="btn btn-sm btn-danger contentdel">删除</a>
											</td>
										</tr>
										{/volist}
									</table>
								</div>
							</div>
						</div>
					</div>
                </div>
                <!-- /Page Body -->
            </div>
            <!-- /Page Content -->

        </div>
        <!-- /Page Container -->
        <!-- Main Container -->

    </div>

   {include file="public/_js"}
   <script type="text/javascript">
   $(function(){

    
    $('.contentdel').click(function(){
    	var id=$(this).attr('dataid');
    	layer.confirm('确定删除么？',{
    		title:'文章删除',
    		icon:3,
    	},function(index){
    		layer.close(index);
    		$.ajax({
    		url:"{:url('admin/content/del')}",
    		type:'post',
    		data:{id:id},
    		dateType:'json',
    		success:function(data){
    			if(data.code==1){
    				layer.msg(data.msg,{
    					icon:6,
    					time:2000,
    				},function(){
    					location.href=data.url
    				});
    			}else{
    				layer.open({
    					title:'删除评论',
    					content:data.msg,
    					icon:5,
    					anim:6
    				});
    			}
    		}


    	});
    	});



    	return false;
    });	

   });

   </script>
</body>
<!--  /Body -->
</html>
